Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only call Twitter API when necessary #904

Conversation

MemoryLeakDeath
Copy link
Contributor

fixes #634

Currently we are calling the Twitter API on each settings page load unnecessarily. I've removed the calls to the api and consolidated it to a new endpoint on the UserSocialController -- "/users/social/twitter/connect".

The new endpoint will do the Twitter authorization_url lookup and, if successful, do the redirect to Twitter that the "Connect with Twitter" button on the user profile page would have done. If we are not successful in contacting the Twitter API, the endpoint will redirect the user back to the user profile page with an error message:

image

NOTE: I am awaiting access from Twitter to their API, so I am only able to test the error path and not the successful path at this time.

There should be no other changes to the Twitter auth flow as a result of this change.

… the connectaccount button and not for every settings page.
@clone1018 clone1018 changed the base branch from dev to main February 27, 2023 11:34
@clone1018
Copy link
Member

Merged in 55812ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't call the Twitter API until the user requests it
2 participants